﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MTS25 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;

    [Description("Session information")]
    public Tag331 SessionInformation_331
    {
      get
      {
        return new Tag331((SwiftElement) this, 0, (SwiftDefinitionElement) MTS25.U0002);
      }
    }

    [Description("Session information")]
    public Tag331 Tag331_SessionInformation
    {
      get
      {
        return this.SessionInformation_331;
      }
    }

    [Description("Error code for Logout/Quit")]
    public Tag401 ErrorCodeLogoutQuit_401
    {
      get
      {
        return new Tag401((SwiftElement) this, 0, (SwiftDefinitionElement) MTS25.U0014);
      }
    }

    [Description("Error code for Logout/Quit")]
    public Tag401 Tag401_ErrorCodeLogoutQuit
    {
      get
      {
        return this.ErrorCodeLogoutQuit_401;
      }
    }

    public MTS25()
      : base(true)
    {
    }

    public MTS25(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MTS25.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MTS25.MessageDefinition = new SwiftMessageDefinition("MTS25", " Quit Acknowledgement");
      MTS25.U0002 = new SwiftTagDefinition("SessionInformation_331", "Session information");
      MTS25.U0002.TagName = "{331:";
      MTS25.U0003 = new SwiftTagSubItemDefinition("SessionNumber", "Session Number");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0003);
      MTS25.U0004 = new SwiftTagSubItemDefinition("DateSessionOpened", "Date Session Opened");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0004);
      MTS25.U0005 = new SwiftTagSubItemDefinition("TimeSessionOpened", "Time Session Opened");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0005);
      MTS25.U0006 = new SwiftTagSubItemDefinition("DateSessionClosed", "Date Session Closed");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0006);
      MTS25.U0007 = new SwiftTagSubItemDefinition("TimeSessionClosed", "Time Session Closed");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0007);
      MTS25.U0008 = new SwiftTagSubItemDefinition("ErrorCode", "Reason For Closure");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0008);
      MTS25.U000E = new SwiftTagSubItemDefinition("ISNQuantity", "Quantity  Of  Messages  Sent");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U000E);
      MTS25.U000F = new SwiftTagSubItemDefinition("OSNQuantity", "Quantity Of Messages Received");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U000F);
      MTS25.U0010 = new SwiftTagSubItemDefinition("FirstISN", "First ISN");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0010);
      MTS25.U0011 = new SwiftTagSubItemDefinition("LastISN", "Last ISN");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0011);
      MTS25.U0012 = new SwiftTagSubItemDefinition("FirstOSN", "First OSN");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0012);
      MTS25.U0013 = new SwiftTagSubItemDefinition("LastOSN", "Last OSN");
      MTS25.U0002.Elements.Add((SwiftDefinitionElement) MTS25.U0013);
      MTS25.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS25.U0002);
      MTS25.U0014 = new SwiftTagDefinition("ErrorCodeLogoutQuit_401", "Error code for Logout/Quit");
      MTS25.U0014.TagName = "{401:";
      MTS25.U0014.Mandatory = false;
      MTS25.U0015 = new SwiftTagSubItemDefinition("ErrorCodeLogoutQuit", "Error Code");
      MTS25.U0014.Elements.Add((SwiftDefinitionElement) MTS25.U0015);
      MTS25.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS25.U0014);
    }
  }
}
